package com.wing.bill.model.enums;

import lombok.Getter;

@Getter
public enum TransferStatusEnum {
    REVOKED(0,"待确认"),
    WAITING_TO_SIGN(1, "确认过户"),
    ;


    private final Integer code;
    private final String desc;

    TransferStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(Integer source) {
        for (TransferStatusEnum value : TransferStatusEnum.values()) {
            if (value.code.equals(source)) {
                return value.desc;
            }
        }
        return null;
    }
}
